#include"TcpServer.hpp"
#include"Http.hpp"
//#define DEMO
int main()
{
#ifdef DEMO
    int id = fork();
    if(id>0)
        exit(0);
    setsid();
#endif
    HttpServer hserver;
    service_io_t fuc=std::bind(&HttpServer::HandlerHttpRequest,&hserver ,std::placeholders::_1);
    std::unique_ptr<TcpServer> server = std::make_unique<TcpServer>(fuc);
    server->Loop();
    return 0;
}